package cn.zhutmj_bigmarket.domain.strategy.service.rule.impl;

import cn.zhutmj_bigmarket.domain.strategy.model.entity.RuleActionEntity;
import cn.zhutmj_bigmarket.domain.strategy.model.entity.RuleMatterEntity;
import cn.zhutmj_bigmarket.domain.strategy.repository.IStrategyRepository;
import cn.zhutmj_bigmarket.domain.strategy.service.annotation.LogicStrategy;
import cn.zhutmj_bigmarket.domain.strategy.service.rule.ILogicFilter;
import cn.zhutmj_bigmarket.domain.strategy.service.rule.factory.DefaultLogicFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @description： 权重规则过滤
 * @author: zhutmj
 * @createTime: 2025/7/616:04
 */
@Slf4j
@Component
@LogicStrategy(logicMode = DefaultLogicFactory.LogicModel.RULE_WIGHT)
public class RuleWeightLogicFilter implements ILogicFilter<RuleActionEntity.RaffleBeforeEntity> {
    @Resource
    private IStrategyRepository strategyRepository;

    public Long userScore = 4500L;

    /**
     * 权重规则过滤；
     * 1. 权重规则格式；4000:102,103,104,105 5000:102,103,104,105,106,107 6000:102,103,104,105,106,107,108,109
     * 2. 解析数据格式；判断哪个范围符合用户的特定抽奖范围
     *
     * @param ruleMatterEntity 规则物料实体对象
     * @return 规则过滤结果
     */

    @Override
    public RuleActionEntity<RuleActionEntity.RaffleBeforeEntity> filter(RuleMatterEntity ruleMatterEntity) {
        // todo: 这个东西具体再看一下，应该就剩这个东西了
        return null;
    }


}
